package com.tuanzahng.example.consumer.controller;

import com.tuanzhang.example.api.dto.UserDTO;
import com.tuanzhang.example.api.service.UserService;
import com.tuanzhang.zhw.rpc.spring.annotaion.RpcReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @RpcReference
    private UserService userService;

    @GetMapping("queryByUserId")
    public UserDTO queryByUserId(Integer id){
       return userService.queryByUserId(id);
    }

}
